<?php
/**
 * @author : xjw129xjt 531201650@qq.com
 */

namespace app\forum\model;

use think\Model;

class ForumType extends Model
{
    protected $table = 'forum_type';

    public function getListByBid($bid)
    {
        static $staticList = array();
        if (isset($staticList['forumTypeList'])) {
            return $staticList['forumTypeList'];
        }
        $list = $this->where('bid', $bid)->where('status', 1)->order('sort asc,id desc')->column('id,title', 'id');
        $staticList['forumTypeList'] = $list;
        return $list;
    }

}

